package fictional.Common;

/**
 * Represents a Species item. 
 */
public class SpeciesItem extends DBItem implements Comparable<SpeciesItem> {

	/**
	 * Returns a new Species object
	 * @param id The id
	 * @param mid The mid
	 */
	public SpeciesItem(int id, String mid,String name) {
		super(id, mid);
		this.species = name;
	}
	
	public SpeciesItem(int id, String mid) {
		super(id,mid);
	}
	
	public void setSpecies(String species) {
		this.species = species;
	}
	public String getSpecies() {
		return species;
	}
	
	@Override
	public String toString()
	{
		return getSpecies();
	}
	
	public int compareTo(SpeciesItem s) {
		if (s.getSpecies().equals(this.species))
			return 0;
		else
			return (s.getSpecies().compareTo(this.getSpecies())) < 1 ? 1 : -1;
	}
	
	private String species;
}
